package com.six.flowerShopper

import org.mybatis.spring.annotation.MapperScan
import org.springframework.boot.SpringApplication
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.cloud.client.discovery.EnableDiscoveryClient
import org.springframework.cloud.client.loadbalancer.LoadBalanced
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.ComponentScan
import org.springframework.web.client.RestTemplate

@SpringBootApplication
@MapperScan(*["com.gitee.sunchenbin.mybatis.actable.dao.*", "com.six.flowerShopper.mapper"])
@ComponentScan(basePackages = ["com.gitee.sunchenbin.mybatis.actable.manager.*", "com.six.flowerShopper.*"])

@EnableDiscoveryClient//开启服务注册发现功能

class ShopperApplication {
    @LoadBalanced
    @Bean
    fun restTemplate(): RestTemplate {
        return RestTemplate()
    }
}


fun main(args: Array<String>) {
    SpringApplication.run(ShopperApplication::class.java, *args)
}